/*
 * @Author: your name
 * @Date: 2021-09-28 10:47:21
 * @LastEditTime: 2021-09-28 14:37:07
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /tdf-ui-quasar-sample/src/demo/api/student.js
 */
import request from "@/tdf/utils/request";

// const base_url = process.env.VUE_APP_BASE_API_PREFIX + "/sys/dept/";
// const base_dept_user_url =
//   process.env.VUE_APP_BASE_API_PREFIX + "/sys/dept-user/";

const base_url = "/sample/user";
const base_urlCourse = "/sample/course-student-score";

export function queryPageStudents(data) {
  return request({
    url: base_url + "/search",
    method: "post",
    data
  });
}

export function add(data) {
  return request({
    url: base_url + "/",
    method: "post",
    data
  });
}

export function deleteById(id) {
  return request({
    url: base_url + "/" + id,
    method: "delete"
  });
}

export function deleteByIds(data) {
  return request({
    url: base_url + "/deleteByIds",
    method: "delete",
    data
  });
}

export function update(data) {
  return request({
    url: base_url + "/",
    method: "put",
    data
  });
}

export function queryAllCourseStudents(data) {
  return request({
    url: base_urlCourse + "/query",
    method: "post",
    data
  });
}

export function addCourseStudent(data) {
  return request({
    url: base_urlCourse + "/batchCreate",
    method: "post",
    data
  });
}

export function updateCourseStudent(data) {
  return request({
    url: base_urlCourse + "/",
    method: "PUT",
    data
  });
}

export function delCourseStudent(data) {
  return request({
    url: base_urlCourse + "/delete",
    method: "DELETE",
    data
  });
}
